<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>二维数组创建和便利</title>
	</head>
	<body>
		<script type="text/javascript">
			var arr2=[[3,2,5],[7,4]];
			//2输出二维数组中的所有元素
			console.log("二维数组元素"+arr2);
			//3.输出二维数组中的arr[0][2]
			console.log("arr2[0][2]="+arr2[0][2]);
		var result=0;
		for (var i in arr2) {
 console.log(arr2[i]);
 for (var j in  arr2[i]) {
 	result+=arr2[i][j];
 }
 console.log(result);
		}
		</script>
	</body>
</html>
